<?php
/**
 * Joomla! 1.5 component ArticleCashRewards
 *
 * @version $Id: controller.php 2009-05-10 01:47:01 svn $
 * @author Maverick
 * @package Joomla.components
 * @subpackage com_articlecashrewards
 * @license GNU/GPL
 * Website: http://www.boddunan.com
 *
 * Review and approve the articles and assign points and cash rewards.
 * Users can see their articles and the points/cash rewards assigned in the front-end module.
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

jimport( 'joomla.application.component.controller' );
require_once( JPATH_COMPONENT.DS.'helpers'.DS.'helper.php' );

class ArticleCashRewardsController extends JController {
   	
   	function display() {
        
        global $acr_config, $mainframe;
        $acr_config = $mainframe->getUserState( SESSION_ACR_CONFIG );
        if(!isset($acr_config)){
            $model = & $this->getModel('config');
            $configt = $model->getConfiguration();

            foreach($configt as $ct){
                $acr_config[$ct->config_name] = $ct->config_value;
            }
            $mainframe->setUserState( SESSION_ACR_CONFIG, $acr_config );
        }

        parent::display();
	}
}
?>